import { Constant } from "../../Constant";
import { Main } from "../../Main";
import StateBase from "../StateBase";

export default class SecondRecruit1StartState extends StateBase {
    begin(preState: number): void {
        super.begin(preState);
        //console.log('SecondRecruit1StartState state--begin');
        const main = this.getUserData() as Main;
        main.roundOptions[2].active = false;
        // main.lightAnimation.setColor([0, 0, 2]);
        main.roundTips[2].showStart(false);
        main.lightAnimation.startAnimation(2, 0, () => {
            console.log('动画完成', 0);
            main.secRoundRoles[2].setSelect()

            main.roundTips[2].showEnd();
            main.scheduleOnce(() => {
                main.mainFsm.goToState(Constant.MainState.SecondRecruit1Finish, main);
            }, 1)
        }, this);
    }
}